<template>
	<svg class="icon" aria-hidden="true" :style="style">
		<use :xlink:href="iconName"></use>
	</svg>
</template>

<script>
	export default {
		name: "icon-svg",
		props: {
			icon: {
				type: String,
				default: ''
			},
			size: {
				type: Number,
				default: 20
			}
		},
		computed: {
			iconName() {
				return `#${this.icon}`;
			},
			style() {
				return `${this.size}px`;
			}
		}
	}
</script>
